//========================================================================================
//  
//  $File: $
//  
//  Owner: Toan Nguyen
//  
//  $Author: $
//  
//  $DateTime: $
//  
//  $Revision: $
//  
//  $Change: $
//  
//  Copyright 1997-2008 Adobe Systems Incorporated. All rights reserved.
//  
//  NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance 
//  with the terms of the Adobe license agreement accompanying it.  If you have received
//  this file from a source other than Adobe, then your use, modification, or 
//  distribution of it requires the prior written permission of Adobe.
//  
//========================================================================================
#ifndef __PnlTrvDataNode_H_DEFINED__
#define __PnlTrvDataNode_H_DEFINED__

/** Class to represent a generic node within a tree, with data
	that is encapsulated in a PMString.

	
	@ingroup paneltreeview
*/

class AMPIssuesDataNode
{
public:
	/** Constructor */
	AMPIssuesDataNode();

	/** Destructor */
	virtual ~AMPIssuesDataNode();

	// +K2Vector support

	/**	Copy constructor
		@param rhs [IN] node reference
		@return  
	 */
	AMPIssuesDataNode(const AMPIssuesDataNode& rhs);

	/**	Operator assignment
		@param rhs [IN] node reference
		@return AMPIssuesDataNode& 
	 */
	AMPIssuesDataNode& operator=(const AMPIssuesDataNode& rhs);

	/** For K2Vector copy semantics
	*/
	typedef object_type data_type;
	// -K2Vector support

	/**	Operator equality
		@param rhs [IN] node reference
		@return bool 
	 */
	bool operator==(const AMPIssuesDataNode& rhs) const;


	/**	Accessor for child by zerobased index in parent's list of kids
		@param indexInParent [IN] which child by zero-based index
		@return child at given index 
	 */
	const AMPIssuesDataNode& GetNthChild(int32 indexInParent) const;

	/**	Accessor for parent
		@return reference to parent node
	 */
	AMPIssuesDataNode* GetParent() const;

	/**	Accessor for size of child list on this node
		@return int32 giving the number of children on this node 
	 */
	int32 ChildCount() const;

	/**	Get the data associated with this node (path or whatever)
		@return data represented here 
	 */
	PMString GetData() const;

	/**	Add child to this node (at end of list)
		@param o [IN] child node to add
	 */
	void AddChild(const AMPIssuesDataNode& o);

	/**	Remove specified child from our list
		@param o [IN] specifies child to remove
	 */
	void RemoveChild(const AMPIssuesDataNode& o);

	/** Mutator for the parent of this node
		@param p [IN] specifies new parent to set
	 */
	void SetParent(const AMPIssuesDataNode* p);

	/**	Mutator for data stored on this
		@param data [IN] specifies the new data to store
	 */
	void SetData(const PMString& data);
	
	int getType() const;
	void setType(const int type);
	
	PMString GetNodeName() const;
	void SetNodeName(const PMString& nodeName);
	
	PMString GetNodeID() const;
	void setNodeID(const PMString& nodeID);
	
	PMString GetNodeImgPath() const;
	void setNodeImgPath(const PMString& nodeImgPath);
	
	void deleteNode();
	
	int getNodeSelect() const;
	void setNodeSelect(const int type);
	
	int GetNodeNumber() const;
	void SetNodeNumber(const int newNumber);
	
	int getNodeStatus() const;
	void setNodeStatus(const int Nodestatus);
	
	int getNodeEditing() const;
	void setNodeEditing(const int NodesEditing);
//private:
public:
	K2Vector<AMPIssuesDataNode> fChildren;	
	PMString fPathData;
	AMPIssuesDataNode* fParent;
	void deepcopy(const AMPIssuesDataNode& rhs);
	PMString fNodeName;
	int nodeType;
	PMString fNodeID;
	PMString fNodeImgPath;
	int IsNodeSelected;
	int nodeNumber;
	int fstatus;
	int fediting_status;
};

#endif // __PnlTrvDataNode_H_DEFINED__

